package wxy.studentmanage.service.impl;

import wxy.studentmanage.bean.Student;

import wxy.studentmanage.bean.Users;
import wxy.studentmanage.mapper.StudMapper;

import wxy.studentmanage.service.StudService;

import java.util.List;

public class StudServiceImpl implements StudService {
    //调用dao层的操作，设置一个set接口，方便Spring管理
    private StudMapper studMapper;

    public void setStudMapper(StudMapper studMapper) {
        this.studMapper = studMapper;
    }


    @Override
    public List<Student> queryAllUser() {
        return studMapper.queryAllStud();
    }

    @Override
    public int addStudent(Student student) {
        return studMapper.addStudent(student);
    }

    @Override
    public int deleteStudById(int wxy_id) {
        return studMapper.deleteStudById(wxy_id);
    }

    @Override
    public Student queryStudById(int wxy_id) {
        return studMapper.queryStudById(wxy_id);
    }

    @Override
    public int updateStud(Student student) {
        return studMapper.updateStud(student);
    }

    @Override
    public Student queryName(String wxy_username) {
        return studMapper.queryName(wxy_username);
    }

    @Override
    public Student login(String wxy_username, String wxy_password) {
        return studMapper.login(wxy_username,wxy_password);
    }


//    @Override
//    public List<Student> queryName(String wxy_username) {
//        return studMapper.queryName(wxy_username);
//    }
//
//    @Override
//    public Student queryName(String wxy_username) {
//        return studMapper.queryName(wxy_username);
//    }




}
